﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.Entity;
using System.Data.SqlServerCe;

namespace SosData
{
    public class sosContext : DbContext
    {
        public sosContext()
            : base("context")
        {
            this.Configuration.AutoDetectChangesEnabled = true;
            this.Database.Connection.ConnectionString = "workstation id=dbUOCMAKER.mssql.somee.com;packet size=4096;user id=webprojects_SQLLogin_1;pwd=m8546vhzy5;data source=dbUOCMAKER.mssql.somee.com;persist security info=False;initial catalog=dbUOCMAKER";
            
        }

        public DbSet<PlantillaGrupo> GruposPlantilla { get; set; }
        public DbSet<Plantilla> Plantillas { get; set; }
        public DbSet<PlantillaContenido> PlantillaContenidos { get; set; }
        public DbSet<PlantillaParametro> PlantillaParametros { get; set; }
        public DbSet<PlantillaUOCsai> plantillaUOCsais { get; set; }

        public DbSet<Usuario> Users { get; set; }
        public DbSet<FormStatus> FormsStatus { get; set; }
        public DbSet<PermisoForm> permisosForms { get; set; }
        public DbSet<ControlesForm> controlesForms { get; set; }

        public DbSet<Aviso> avisos { get; set; }
        public DbSet<Tipologia> tipologias { get; set; }

        

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            base.OnModelCreating(modelBuilder);
            modelBuilder.Conventions.Remove<System.Data.Entity.ModelConfiguration.Conventions.PluralizingTableNameConvention>();
            
        }
         
    }
}
